import { createRouter, createWebHistory } from 'vue-router'
import LoginView from '../views/LoginView.vue'
import UserListView from '../views/UserListView.vue'
import UserCreateView from '../views/UserCreateView.vue'

const routes = [
  { path: '/login', component: LoginView },
  { path: '/users', component: UserListView },
  { path: '/users/create', component: UserCreateView },
  { path: '/', redirect: '/login' }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router